def pdcm (y):
    if y!=1:
        while y!=1:
            if int(y)%2==0:
                y=int(y)/2
            else:
                return (0)
        return (1)
    else:
        return (1)
num=0
a=input("输入一个大于一的整数：")
while a!=1:
    if int(a)%2==0:
        a=int(a)/2
        num+=1
        print("^")
    else:
        if pdcm(int(a)+1)==1:
            a=int(a)+1
            num+=1
            print("+")
        else:
            a=int(a)-1
            num+=1
            print("-")
print("\n",num)

        
